﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ExamSystem.Mdeol;
using ExamSystem.BLL;
namespace ExamSystem.qt
{
    public partial class Login : System.Web.UI.Page
    {
        private  TstudentBLL tb = new TstudentBLL();
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnLogin_Click(object sender, EventArgs e)
        {
            //获取值
            string uid = this.uid.Value;
            string pid = this.pid.Value;
            if (string.IsNullOrEmpty(uid))
            {
                this.lbMsg.InnerText = "请输入用户名";
            }
            if (string.IsNullOrEmpty(pid))
            {
                this.lbMsg.InnerText = "请输入密码";
            }
            Tstudent ts = tb.islogin(uid,pid);
            if (ts==null)
            {
                this.lbMsg.InnerText = "信息错误";

            }
            else
            {
                Session["uid"] = uid;
                Session["tsid"] = ts.TsId;
                Response.Redirect("TPager_List.aspx");
            }
        }
    }
}